package org.yray.sip.rtp.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.epoll.EpollDatagramChannel;

public class EpollUrtcpChannelInitializer extends ChannelInitializer<EpollDatagramChannel> {
    private UrtcpServerHandler urtcpServerHandler;

    public EpollUrtcpChannelInitializer(UrtcpServerHandler urtcpServerHandler) {
        this.urtcpServerHandler = urtcpServerHandler;
    }

    @Override
    protected void initChannel(EpollDatagramChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(urtcpServerHandler);
    }
}
